function loadBooking()
{
	$.post
	('model/ajax/event-edit-booking-edit.php',
		{
			EventID:EventID,
			UserID:UserID,
			SessionID:SessionID
		},
		loadBookingComplete
	)
	
}

function loadBookingComplete(data)
{
	$('#calendar-month-event-edit-booking-edit').dialog
	(
		{
       		autoOpen: false,
       		modal: true,
       		title: "Event Booking Details",
			height: 600,
			width: 800,
       		buttons: 
       		{
           		'OK' : function() {$(this).dialog('close');},
           		'Cancel': function() {$(this).dialog('close');}
       		},
       		open: function(event,ui) 
       		{
				$("#calendar-month-event-edit-booking-edit")
                   	.html(data)
                   	.find("#calendar-month-event-edit-booking-edit-tabs")
                   	.tabs();
       		}
   		}
   	);
   
	$('#calendar-month-event-edit-booking-edit').dialog('open');
	
	$('.edit-tab').editor
/*		(
		function()
		{
//			alert("Hover over text and click the button that appears to begin editing");

//			$( "#calendar-month-event-edit-booking-edit-tabs" ).tabs("option","disabled", true);
			$(this).editor*/
			(
				{
//					autoEnable: true, // Enable the editor automaticly
/*					replace: true,
					enableUi: false,
					draggable: false,
					ui: 
					{
						cancel: true,
						save: {plugin: 'saveJson'},
						textBold: true,
						textItalic: true,
						textUnderline: true,
						textStrike: true,
					},*/
					plugins: 
					{ // Plugin options
						dock: 
						{ // Dock specific plugin options
//							docked: true, // Start the editor already docked
//							dockToElement: true, // Dock the editor inplace of the element
//							persist: false // Do not save the docked state
						},
						
						saveJson: 
						{
							/**
							  * True if you want a message to be displayed to the user on save
							  */
							showResponse: true,
							/**
							  * Attribute name that contains the content's ID.
							  * Instead of what is used here, you may also provide a string or a function.
							  * The function would be called with the editing element as the first argument,
							  * and the saveJson plugin as the context (this).
							  */
							id: 
							{
								attr: 'data-content_id'
							},
/*							id:
							{
								function(element)
								{
									alert("hello");
								}
							},*/
							
/*							
							function($element)
							{
								$.post
								(
									'model/ajax/event-edit-booking-save.php',
									{raptorContent:$element}
								);
								$(this).parent().children('.edit-tab').html($element.html());
							},*/
							
							
							/**
							  * String to be used as the editing element's content key.
							  * e.g. $_POST['raptor-content']
							  */
							postName: 'raptor-content',
							ajax: 
							{
								url: 'model/ajax/event-edit-booking-save.php'
							}
						}
					}
				}
			);
/*			
//			$(this).hide();

		}
		);*/
	
}

